//
//  BaseButton.m
//  TodatPlay
//
//  Created by dllo on 16/8/30.
//  Copyright © 2016年 DM.C. All rights reserved.
//

#import "BaseButton.h"

@implementation BaseButton
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        self.layer.borderColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.3].CGColor;
        self.layer.borderWidth = 1;
        self.layer.cornerRadius = 5;
        if (self.selected) {
            [self setSelected:YES];
            self.backgroundColor = [UIColor redColor];
        } else {
            [self setSelected:NO];
            self.backgroundColor = [UIColor whiteColor];
        }
        

    }
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
